package priorityThread;

public class Demo1 {
    public static void main(String[] args) {
        //创建线程要执行的参数对象
        MyRunnable myRunnable= new MyRunnable();
        //创建线程对象
        Thread t1= new Thread(myRunnable,"飞机");
        Thread t2= new Thread(myRunnable,"坦克");
//        System.out.println(t1.getPriority());
//        System.out.println(t2.getPriority());
//        System.out.println(Thread.currentThread().getPriority());
        t1.setPriority(1);
        t2.setPriority(10);
        t1.start();
        t2.start();
    }
}
